<!--# layout("/common/layout.html",{"jsBase":"/js/cms/xxdItem/"}){ -->

<form class="layui-form layui-form-pane" id="updateForm">
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">商品标题</label>
				<div class="layui-input-inline">
					<input type="text" id="title" name="title"  value="${xxdItem.title}"   class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">商品卖点</label>
				<div class="layui-input-inline">
					<input type="text" id="sellPoint" name="sellPoint"  value="${xxdItem.sellPoint}"   class="layui-input" >
				</div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">商品价格</label>
				<div class="layui-input-inline">
					<input type="text" id="price" name="price"  value="${xxdItem.price}"   class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">库存数量</label>
				<div class="layui-input-inline">
					<input type="text" id="num" name="num"  value="${xxdItem.num}"   class="layui-input" >
				</div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">

        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" title="类目">类目</label>
                <div class="layui-input-inline">
                    <layui:simpleDictSelect style='layui-input-inline' type="item_cat" layVerify=""
                                            id="cid" name="cid" value="" />
                </div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">商品状态</label>
				<div class="layui-input-inline">
                    <layui:simpleDictSelect style='layui-input-inline' type="item_status" layVerify=""
                                            id="status" name="status" value="" />
				</div>
            </div>
        </div>
    </div>


    <input id="image" type="hidden" name="image" class="layui-input" value="${xxdItem.image}">
	<!-- 业务对象须有hidden字段，保存delFlag和version字段-->
    <input type="hidden" name="id" value=${xxdItem.id} />
    <layui:submitButtons id="updateButton" />
</form>
<div class="layui-row">
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-form-item my-item-style">
                <div class="layui-inline my-liline-style">
                    <layui:fastdfsUploadImgModify id="itemPic" value="" btnName="点击修改" addr="${xxdItem.image}"/>
                </div>
            </div>
        </div>
    </div>
<div/>
<!--#} -->
<script>
layui.use(['edit','form'], function(){
    var xxdItemEdit = layui.edit;
    var form = layui.form;
    xxdItemEdit.init();

    $("#cid").find("option[value="+${xxdItem.cid!'-1'}+"]").prop("selected",true);
    $("#status").find("option[value="+${xxdItem.status}+"]").prop("selected",true);
    form.render();
});
</script>
